/**
* \file VaisseauMere.cpp
* \brief Ensemble des methodes de la classe VaisseauMere
* \author FEKI Mehdi && RIPOCHE Emilien
* \version 1.0
* \date 04/12/2011
*/

#include "VaisseauMere.h"

VaisseauMere::VaisseauMere() 
	: Vaisseau() {};

VaisseauMere::VaisseauMere(int posX, int posY) 
	: Vaisseau(posX, posY) {};

bool VaisseauMere::tirer() {
	if (_nbCharges <= 0) {
		return false;
	}
	--_nbCharges;
	return true;
};

bool VaisseauMere::charger() {
	if (_nbCharges >= NBCHARGESMAXVM) {
		return false;
	}
	++_nbCharges;
	return true;
};

Vaisseau::TypeVaisseau VaisseauMere::type() const {
	return Vaisseau::VaisseauMere;
}

void VaisseauMere::prendreArtefact() {
	setHasArtefact(true);
};

void VaisseauMere::libererArtefact() {
	setHasArtefact(false);
};


/*
int main() {
	VaisseauMere* v = new VaisseauMere();
	cout << "Nombre de charges : " << v->getNbCharges() << endl;
	cout << "Artefact ? " << v->hasArtefact() << endl;
	cout << "Position : ("<< v->getX() << "," << v->getY() << ")" << endl;
	cout << "Deplacement en (4,2)..." << endl;
	v->deplacementAbsolu(4,2);
	cout << "Position : ("<< v->getX() << "," << v->getY() << ")" << endl;
	cout << "Deux chargements + recuperer artefact" << endl;
	v->charger();
	v->charger();
	v->prendreArtefact();
	cout << "Nombre de charges : " << v->getNbCharges() << endl;
	cout << "Artefact ? " << v->hasArtefact() << endl;
	cout << "Tir..." << endl;
	v->tirer();
	cout << "Nombre de charges : " << v->getNbCharges() << endl;
	system("PAUSE");
}
*/